Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render property fields with type rdf:HTML #170

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Render property fields with type rdf:HTML #170

merged 1 commit into from
Jan 20, 2025

Conversation

ashleysommer
Copy link
Contributor

@ashleysommer ashleysommer commented Jul 2, 2024

Fixes issues with displaying TERN Controlled Vocabularies and TERN Concept Schemes, that make heavy use of HTML-formatted fields in the vocabs and concepts.

Detect property rows with type rdf:HTML and render them directly in the dom.

Use dom-purify (vue-dom-purify Vue plugin) to sanitize the HTML before rendering, to prevent JS injection and other similar exploits.

Screenshot before fixes:
image

Screenshot of concept description at top of PropsTable page with rendered HTML:
Screenshot_20240702_132130

Screenshot of property row object field with type rdf:HTML rendered:
Screenshot_20240702_132211

See it in action here: https://vocabs.bdr.gov.au/v/vocab/defn:nrm/emsa-cv:6fd39a33-9c4f-469e-80a5-e76b5d5f04a6

…he dom.

Use dom-purify (vue-dom-purify Vue plugin) to sanitize the HTML before rendering, to prevent JS injection and other similar exploits.
@ashleysommer
Copy link
Contributor Author

ashleysommer commented Jul 2, 2024

Copy link
Collaborator

@hjohns hjohns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ashley, looks good.

@hjohns hjohns merged commit 56bd707 into main Jan 20, 2025
1 check failed
@jamiefeiss jamiefeiss deleted the fix-render-html branch January 22, 2025 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants